import request from "../service";

//全部班级
export function getClassNameList() {
    return request({
        url: `/class/getClassNameList`,
        method: "get"
    });
}


//班级列表
export function getClassList(page) {
    return request({
        url: `/class/getClassList`,
        method: "POST",
        data: page,
    });
}

//添加班级
export function addClassInfo(classInfo) {
    console.log(123);
    return request({
        url: `/class/addClass`,
        method: "POST",
        data: JSON.stringify(classInfo),
        // headers: {//新增配置
        // 'Content-Type': 'application/json;charset=UTF-8'
        // }
    });
}

//修改班级
export function updateClassInfo(classInfo) {
    return request({
        url: `/class/updateClass`,
        method: "POST",
        data: JSON.stringify(classInfo)
    });
}

//删除班级
export function delClassInfo(id) {
    return request({
        url: `/class/deleteClass`,
        method: "POST",
        data: {
            id
        }
    });
}

